﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板

namespace GamebarPowerPanel
{
    /// <summary>
    /// 可用于自身或导航至 Frame 内部的空白页。
    /// </summary>
    public sealed partial class GamebarWidget : Page
    {
        public GamebarWidget()
        {
            this.InitializeComponent();
            this.webView1.Source = new Uri("http://localhost:26214/gamebar.html");
            this.webView1.CoreWebView2Initialized += WebView1_CoreWebView2Initialized;
        }

        private void WebView1_CoreWebView2Initialized(Microsoft.UI.Xaml.Controls.WebView2 sender, Microsoft.UI.Xaml.Controls.CoreWebView2InitializedEventArgs args)
        {
            this.webView1.CoreWebView2.Settings.IsPinchZoomEnabled = false;
            this.webView1.CoreWebView2.Settings.IsSwipeNavigationEnabled = false;
            this.webView1.CoreWebView2.Settings.IsZoomControlEnabled = false;
            
        }
    }
}
